package com.anthonybennis.blender.client;

import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.Style.VerticalAlign;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

/**
 * 
 * @author Anthony
 *
 */
public class VerticallyCenteredLabel 
{
	private final Label _label;
	private final VerticalPanel  _panel;
	
	/**
	 * 
	 */
	public VerticallyCenteredLabel()
	{
		_panel = new VerticalPanel();
		_label = new Label();
		_panel.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE);
		
		_panel.add(_label);
	}
	
	public void setText(String text)
	{
		_label.setText(text);
	}
	
	public Element getElement()
	{
		return _label.getElement();
	}
	
	public void setBackgroundColor(String colour)
	{
		_label.getElement().getStyle().setBackgroundColor(colour);
	}
}
